import {DocsLayout} from 'fumadocs-ui/layouts/docs';
import {baseOptions} from '@/lib/layout.shared';
import {source} from '@/lib/source';
import {ReactNode} from "react";

export default async function Layout(
    {
        params, children,
    }: {
        params: Promise<{ lang: string }>;
        children: ReactNode;
    }) {
    const { lang } = await params;
    return (
        <DocsLayout tree={source.pageTree[lang]}
                    {...baseOptions(lang)}>
            {children}
        </DocsLayout>
    );
}
